home *** CD-ROM | disk | FTP | other *** search
- // Borland C++ Builder
- // Copyright (c) 1995, 1998 by Borland International
- // All rights reserved
-
- // (DO NOT EDIT: machine generated header) 'UPTTreeList.pas' rev: 3.00
-
- #ifndef UPTTreeListHPP
- #define UPTTreeListHPP
- #include <Menus.hpp>
- #include <Commctrl.hpp>
- #include <ComCtrls.hpp>
- #include <Dialogs.hpp>
- #include <Forms.hpp>
- #include <Controls.hpp>
- #include <Graphics.hpp>
- #include <Classes.hpp>
- #include <SysUtils.hpp>
- #include <Messages.hpp>
- #include <Windows.hpp>
- #include <SysInit.hpp>
- #include <System.hpp>
-
- //-- user supplied -----------------------------------------------------------
-
- namespace Upttreelist
- {
- //-- type declarations -------------------------------------------------------
- #pragma pack(push, 1)
- struct TNMCustomDraw
- {
- tagNMHDR hdr;
- int dwDrawStage;
- HDC hdc;
- Windows::TRect rc;
- int dwItemSpec;
- int uItemState;
- int lParam;
- } ;
- #pragma pack(pop)
-
- typedef TNMCustomDraw *PNMCustomDraw;
-
- #pragma pack(push, 1)
- struct TNMLvCustomDraw
- {
- TNMCustomDraw nmcd;
- int clrText;
- int clrTextBk;
- int subItem;
- } ;
- #pragma pack(pop)
-
- typedef TNMLvCustomDraw *PNMLvCustomDraw;
-
- #pragma pack(push, 1)
- struct TNMTvCustomDraw
- {
- TNMCustomDraw nmcd;
- int clrText;
- int clrTextBk;
- int level;
- } ;
- #pragma pack(pop)
-
- typedef TNMTvCustomDraw *PNMTvCustomDraw;
-
- enum TPTCustomDrawStage { ptcdsUnknown, ptcdsPrePaint, ptcdsPostPaint, ptcdsPreErase, ptcdsItemPrePaint,
- ptcdsItemPostPaint, ptcdsItemPreErase, ptcdsItemPostErase };
-
- class DELPHICLASS TPTCustomDraw;
- class PASCALIMPLEMENTATION TPTCustomDraw : public System::TObject
- {
- typedef System::TObject inherited;
-
- private:
- Graphics::TFont* mParentFont;
- Graphics::TFont* mFont;
- bool mfFontChanged;
- Graphics::TBrush* mBrush;
- bool mfBrushChanged;
- bool mfWantItems;
- bool mfNoDefaultDrawing;
- TNMCustomDraw *mpcd;
- int *mpResult;
- bool mfUserResult;
- Graphics::TCanvas* mCanvas;
- void __fastcall OnFontChange(System::TObject* aSender);
- void __fastcall OnBrushChange(System::TObject* aSender);
- int __fastcall GetRawDrawStage(void);
- Windows::TRect __fastcall GetRect(void);
- TPTCustomDrawStage __fastcall GetDrawStage(void);
- Graphics::TFont* __fastcall GetFont(void);
- Graphics::TBrush* __fastcall GetBrush(void);
- Graphics::TCanvas* __fastcall GetCanvas(void);
- HDC __fastcall GetHandle(void);
- bool __fastcall GetIsItem(void);
- int __fastcall GetResult(void);
- void __fastcall SetFont(Graphics::TFont* aValue);
- void __fastcall SetBrush(Graphics::TBrush* aValue);
- void __fastcall SetResult(int aValue);
-
- protected:
- virtual void __fastcall Reset(const TNMCustomDraw &acd, int &aResult);
- virtual Graphics::TFont* __fastcall CreateFont(void);
- virtual Graphics::TBrush* __fastcall CreateBrush(void);
-
- public:
- __fastcall TPTCustomDraw(const TNMCustomDraw &acd, int &aResult, const Graphics::TFont* aParentFont
- );
- __fastcall virtual ~TPTCustomDraw(void);
- virtual void __fastcall Apply(void) = 0;
- __property int RawDrawStage = {read=GetRawDrawStage, nodefault};
- __property TPTCustomDrawStage DrawStage = {read=GetDrawStage, nodefault};
- __property bool IsItem = {read=GetIsItem, nodefault};
- __property bool WantItems = {read=mfWantItems, write=mfWantItems, nodefault};
- __property int Result = {read=GetResult, write=SetResult, nodefault};
- __property Windows::TRect Rect = {read=GetRect};
- __property Graphics::TCanvas* Canvas = {read=GetCanvas};
- __property HDC Handle = {read=GetHandle, nodefault};
- __property Graphics::TFont* Font = {read=GetFont, write=SetFont};
- __property Graphics::TBrush* Brush = {read=GetBrush, write=SetBrush};
- __property bool NoDefaultDrawing = {read=mfNoDefaultDrawing, write=mfNoDefaultDrawing, nodefault};
- };
-
- class DELPHICLASS TPTTvCustomDraw;
- class PASCALIMPLEMENTATION TPTTvCustomDraw : public Upttreelist::TPTCustomDraw
- {
- typedef Upttreelist::TPTCustomDraw inherited;
-
- public:
- PNMTvCustomDraw __fastcall GetMpTvCd(void);
- __property PNMTvCustomDraw mpTvCd = {read=GetMpTvCd};
-
- protected:
- __fastcall TPTTvCustomDraw(const TNMCustomDraw &aCD, int &aResult, const Graphics::TFont* aParentFont
- );
-
- public:
- virtual void __fastcall Apply(void);
- public:
- /* TPTCustomDraw.Destroy */ __fastcall virtual ~TPTTvCustomDraw(void) { }
-
- };
-
- class DELPHICLASS TPTLvCustomDraw;
- class PASCALIMPLEMENTATION TPTLvCustomDraw : public Upttreelist::TPTCustomDraw
- {
- typedef Upttreelist::TPTCustomDraw inherited;
-
- public:
- PNMLvCustomDraw __fastcall GetMpLvCd(void);
- __property PNMLvCustomDraw mpLvCD = {read=GetMpLvCd};
-
- protected:
- __fastcall TPTLvCustomDraw(const TNMCustomDraw &acd, int &aResult, const Graphics::TFont* aParentFont
- );
-
- public:
- virtual void __fastcall Apply(void);
- public:
- /* TPTCustomDraw.Destroy */ __fastcall virtual ~TPTLvCustomDraw(void) { }
-
- };
-
- typedef void __fastcall (__closure *TPTTvOnNodeContextMenuEvent)(System::TObject* aSender, Comctrls::TTreeNode*
- aNode, tagPOINT &aPos, Menus::TPopupMenu* &aMenu);
-
- typedef void __fastcall (__closure *TPTTvCustomDrawEvent)(System::TObject* aSender, TPTCustomDraw* aCD
- , Comctrls::TTreeNode* aNode);
-
- class DELPHICLASS TPTCustomTreeView;
- class PASCALIMPLEMENTATION TPTCustomTreeView : public Comctrls::TCustomTreeView
- {
- typedef Comctrls::TCustomTreeView inherited;
-
- private:
- TPTTvOnNodeContextMenuEvent mOnNodeContextMenuProc;
- TPTTvCustomDrawEvent mOnPTCustomDraw;
- TPTTvCustomDrawEvent mOnPTCustomDrawEx;
- bool mfMenuAlreadyHandled;
- System::TObject* mLastCustomDrawObj;
- HIDESBASE MESSAGE void __fastcall CMColorChanged(Messages::TMessage &aMsg);
- HIDESBASE MESSAGE void __fastcall CMFontChanged(Messages::TMessage &aMsg);
- HIDESBASE MESSAGE void __fastcall CMSysColorChange(Messages::TMessage &aMsg);
- HIDESBASE MESSAGE void __fastcall CNNotify(Messages::TWMNotify &aMsg);
- HIDESBASE MESSAGE void __fastcall WMRButtonUp(Messages::TWMMouse &aMsg);
- MESSAGE void __fastcall WMContextMenu(Messages::TMessage &aMsg);
-
- protected:
- virtual void __fastcall CreateParams(Controls::TCreateParams &p);
- virtual void __fastcall CreateWnd(void);
- virtual void __fastcall DestroyWnd(void);
- DYNAMIC TPTCustomDraw* __fastcall CreateCustomDraw(const TNMCustomDraw &aNMHDR, int &aResult);
- virtual TPTCustomDraw* __fastcall PTCustomDraw(const TNMCustomDraw &aNMHDR, int &aResult);
- DYNAMIC void __fastcall DoPreNodeContextMenu(void);
- DYNAMIC void __fastcall DoNodeContextMenu(Comctrls::TTreeNode* aNode, const tagPOINT &ap);
- DYNAMIC void __fastcall KeyDown(Word &key, Classes::TShiftState aShiftState);
- DYNAMIC void __fastcall NodeContextMenu(Comctrls::TTreeNode* aNode, tagPOINT &aPos, Menus::TPopupMenu*
- &aMenu);
- __property TPTTvCustomDrawEvent OnPTCustomDrawEx = {read=mOnPTCustomDrawEx, write=mOnPTCustomDrawEx
- };
- __property TPTTvCustomDrawEvent OnPTCustomDraw = {read=mOnPTCustomDraw, write=mOnPTCustomDraw};
- __property TPTTvOnNodeContextMenuEvent OnNodeContextMenu = {read=mOnNodeContextMenuProc, write=mOnNodeContextMenuProc
- };
-
- public:
- __fastcall virtual ~TPTCustomTreeView(void);
- void __fastcall InvalidateNode(Comctrls::TTreeNode* aNode, bool afTextOnly, bool afEraseBkgnd);
- public:
-
- /* TCustomTreeView.Create */ __fastcall virtual TPTCustomTreeView(Classes::TComponent* AOwner) : Comctrls::
- TCustomTreeView(AOwner) { }
-
- public:
- /* TWinControl.CreateParented */ __fastcall TPTCustomTreeView(HWND ParentWindow) : Comctrls::TCustomTreeView(
- ParentWindow) { }
-
- };
-
- class DELPHICLASS TPTTreeView;
- class PASCALIMPLEMENTATION TPTTreeView : public Upttreelist::TPTCustomTreeView
- {
- typedef Upttreelist::TPTCustomTreeView inherited;
-
- __published:
- __property ShowButtons ;
- __property BorderStyle ;
- __property DragCursor ;
- __property ShowLines ;
- __property ShowRoot ;
- __property ReadOnly ;
- __property DragMode ;
- __property HideSelection ;
- __property Indent ;
- __property Items ;
- __property OnEditing ;
- __property OnEdited ;
- __property OnExpanding ;
- __property OnExpanded ;
- __property OnCollapsing ;
- __property OnCompare ;
- __property OnCollapsed ;
- __property OnChanging ;
- __property OnChange ;
- __property OnDeletion ;
- __property OnGetImageIndex ;
- __property OnGetSelectedIndex ;
- __property Align ;
- __property Enabled ;
- __property Font ;
- __property Color ;
- __property ParentColor ;
- __property ParentCtl3D ;
- __property Ctl3D ;
- __property SortType ;
- __property TabOrder ;
- __property TabStop ;
- __property Visible ;
- __property OnClick ;
- __property OnEnter ;
- __property OnExit ;
- __property OnDragDrop ;
- __property OnDragOver ;
- __property OnStartDrag ;
- __property OnEndDrag ;
- __property OnMouseDown ;
- __property OnMouseMove ;
- __property OnMouseUp ;
- __property OnDblClick ;
- __property OnKeyDown ;
- __property OnKeyPress ;
- __property OnKeyUp ;
- __property PopupMenu ;
- __property ParentFont ;
- __property ParentShowHint ;
- __property ShowHint ;
- __property Images ;
- __property StateImages ;
- __property RightClickSelect ;
- __property OnPTCustomDraw ;
- __property OnPTCustomDrawEx ;
- __property OnNodeContextMenu ;
- public:
- /* TPTCustomTreeView.Destroy */ __fastcall virtual ~TPTTreeView(void) { }
-
- public:
- /* TCustomTreeView.Create */ __fastcall virtual TPTTreeView(Classes::TComponent* AOwner) : Upttreelist::
- TPTCustomTreeView(AOwner) { }
-
- public:
- /* TWinControl.CreateParented */ __fastcall TPTTreeView(HWND ParentWindow) : Upttreelist::TPTCustomTreeView(
- ParentWindow) { }
-
- };
-
- typedef void __fastcall (__closure *TPTLvOnItemContextMenuEvent)(System::TObject* aSender, Comctrls::TListItem*
- aItem, tagPOINT &aPos, Menus::TPopupMenu* &aMenu);
-
- typedef void __fastcall (__closure *TPTLvCustomDrawEvent)(System::TObject* aSender, TPTCustomDraw* aCD
- , Comctrls::TListItem* aItem);
-
- enum TPTLvSortDirection { ptsdAsc, ptsdDesc };
-
- enum TPTLvHeaderSortDisplayMode { ptlvNone, ptlvLeftAlign, ptlvRightOfText, ptlvRightAlign };
-
- class DELPHICLASS TPTCustomListView;
- class PASCALIMPLEMENTATION TPTCustomListView : public Comctrls::TCustomListView
- {
- typedef Comctrls::TCustomListView inherited;
-
- private:
- TPTLvOnItemContextMenuEvent mOnItemContextMenuProc;
- TPTLvCustomDrawEvent mOnPTCustomDraw;
- TPTLvCustomDrawEvent mOnPTCustomDrawEx;
- bool mfMenuAlreadyHandled;
- System::TObject* mLastCustomDrawObj;
- bool mfDragStarted;
- Graphics::TCanvas* FHeaderCanvas;
- int FHeaderSortColumn;
- TPTLvSortDirection FHeaderSortDirection;
- TPTLvHeaderSortDisplayMode FHeaderSortDisplayMode;
- bool FHeaderDefaultDrawing;
- int FSetHeaderODStyleSem;
- HWND __fastcall GetHeaderHandle(void);
- Comctrls::TViewStyle __fastcall GetViewStyle(void);
- HIDESBASE MESSAGE void __fastcall CMColorChanged(Messages::TMessage &aMsg);
- HIDESBASE MESSAGE void __fastcall CMSysColorChange(Messages::TMessage &aMsg);
- HIDESBASE MESSAGE void __fastcall CNNotify(Messages::TWMNotify &aMsg);
- void __fastcall SetHeaderSortColumn(int Value);
- void __fastcall SetHeaderSortDirection(TPTLvSortDirection Value);
- void __fastcall SetHeaderSortDisplayMode(TPTLvHeaderSortDisplayMode Value);
- MESSAGE void __fastcall AMInitStage2(Messages::TMessage &aMsg);
- MESSAGE void __fastcall WMContextMenu(Messages::TMessage &aMsg);
- HIDESBASE MESSAGE void __fastcall WMDrawItem(Messages::TWMDrawItem &aMsg);
- HIDESBASE MESSAGE void __fastcall WMNotify(Messages::TWMNotify &aMsg);
- HIDESBASE MESSAGE void __fastcall WMParentNotify(Messages::TWMParentNotify &aMsg);
- HIDESBASE MESSAGE void __fastcall WMRButtonUp(Messages::TWMMouse &aMsg);
-
- protected:
- HIDESBASE void __fastcall SetViewStyle(Comctrls::TViewStyle AValue);
- virtual void __fastcall CreateWnd(void);
- virtual void __fastcall DestroyWnd(void);
- void __fastcall DrawHeader(int AIndex, const Windows::TRect &ARect);
- void __fastcall DrawHeaderGlyphs(int Index, const Windows::TRect &ARect);
- void __fastcall DefaultDrawHeader(int AIndex, const Windows::TRect &ARect);
- void __fastcall SetHeaderODStyle(void);
- DYNAMIC TPTCustomDraw* __fastcall CreateCustomDraw(const TNMCustomDraw &aNMHDR, int &aResult);
- virtual TPTCustomDraw* __fastcall PTCustomDraw(const TNMCustomDraw &aNMHDR, int &aResult);
- DYNAMIC void __fastcall DoPreItemContextMenu(const tagPOINT &pt);
- DYNAMIC void __fastcall DoItemContextMenu(const tagPOINT &p);
- DYNAMIC void __fastcall ItemContextMenu(Comctrls::TListItem* aItem, tagPOINT &aPos, Menus::TPopupMenu*
- &aMenu);
- DYNAMIC void __fastcall KeyDown(Word &key, Classes::TShiftState aShiftState);
- __property TPTLvCustomDrawEvent OnPTCustomDraw = {read=mOnPTCustomDraw, write=mOnPTCustomDraw};
- __property TPTLvCustomDrawEvent OnPTCustomDrawEx = {read=mOnPTCustomDrawEx, write=mOnPTCustomDrawEx
- };
- __property TPTLvOnItemContextMenuEvent OnItemContextMenu = {read=mOnItemContextMenuProc, write=mOnItemContextMenuProc
- };
- __property Graphics::TCanvas* HeaderCanvas = {read=FHeaderCanvas};
- __property HWND HeaderHandle = {read=GetHeaderHandle, nodefault};
- __property bool HeaderDefaultDrawing = {read=FHeaderDefaultDrawing, write=FHeaderDefaultDrawing, default=1
- };
- __property TPTLvHeaderSortDisplayMode HeaderSortDisplayMode = {read=FHeaderSortDisplayMode, write=SetHeaderSortDisplayMode
- , default=2};
- __property int HeaderSortColumn = {read=FHeaderSortColumn, write=SetHeaderSortColumn, default=-1};
- __property TPTLvSortDirection HeaderSortDirection = {read=FHeaderSortDirection, write=SetHeaderSortDirection
- , default=0};
- __property Comctrls::TViewStyle ViewStyle = {read=GetViewStyle, write=SetViewStyle, default=0};
-
- public:
- __fastcall virtual TPTCustomListView(Classes::TComponent* aOwner);
- __fastcall virtual ~TPTCustomListView(void);
- public:
- /* TWinControl.CreateParented */ __fastcall TPTCustomListView(HWND ParentWindow) : Comctrls::TCustomListView(
- ParentWindow) { }
-
- };
-
- class DELPHICLASS TPTListView;
- class PASCALIMPLEMENTATION TPTListView : public Upttreelist::TPTCustomListView
- {
- typedef Upttreelist::TPTCustomListView inherited;
-
- public:
- __property HeaderCanvas ;
- __property HeaderHandle ;
- __property HeaderSortColumn ;
- __property HeaderSortDirection ;
-
- __published:
- __property Align ;
- __property BorderStyle ;
- __property Color ;
- __property ColumnClick ;
- __property Columns ;
- __property Enabled ;
- __property OnClick ;
- __property OnDblClick ;
- __property Ctl3D ;
- __property DragMode ;
- __property ReadOnly ;
- __property Font ;
- __property HideSelection ;
- __property IconOptions ;
- __property Items ;
- __property AllocBy ;
- __property MultiSelect ;
- __property OnChange ;
- __property OnChanging ;
- __property OnColumnClick ;
- __property OnCompare ;
- __property OnDeletion ;
- __property OnEdited ;
- __property OnEditing ;
- __property OnEnter ;
- __property OnExit ;
- __property OnInsert ;
- __property OnDragDrop ;
- __property OnDragOver ;
- __property DragCursor ;
- __property OnStartDrag ;
- __property OnEndDrag ;
- __property OnMouseDown ;
- __property OnMouseMove ;
- __property OnMouseUp ;
- __property ParentColor ;
- __property ParentFont ;
- __property ParentShowHint ;
- __property ShowHint ;
- __property PopupMenu ;
- __property ShowColumnHeaders ;
- __property SortType ;
- __property TabOrder ;
- __property TabStop ;
- __property ViewStyle ;
- __property Visible ;
- __property OnKeyDown ;
- __property OnKeyPress ;
- __property OnKeyUp ;
- __property StateImages ;
- __property LargeImages ;
- __property SmallImages ;
- __property Checkboxes ;
- __property GridLines ;
- __property HotTrack ;
- __property RowSelect ;
- __property HeaderDefaultDrawing ;
- __property HeaderSortDisplayMode ;
- __property OnPTCustomDraw ;
- __property OnPTCustomDrawEx ;
- __property OnItemContextMenu ;
- public:
- /* TPTCustomListView.Create */ __fastcall virtual TPTListView(Classes::TComponent* aOwner) : Upttreelist::
- TPTCustomListView(aOwner) { }
- /* TPTCustomListView.Destroy */ __fastcall virtual ~TPTListView(void) { }
-
- public:
- /* TWinControl.CreateParented */ __fastcall TPTListView(HWND ParentWindow) : Upttreelist::TPTCustomListView(
- ParentWindow) { }
-
- };
-
- //-- var, const, procedure ---------------------------------------------------
- extern PACKAGE void __fastcall DrawDownArrow(Graphics::TCanvas* ACanvas, const Windows::TRect &ARect
- , Graphics::TColor ABackgroundColor, Graphics::TColor AShadowColor, Graphics::TColor AHighlightColor
- );
- extern PACKAGE void __fastcall DrawUpArrow(Graphics::TCanvas* ACanvas, const Windows::TRect &ARect,
- Graphics::TColor ABackgroundColor, Graphics::TColor AShadowColor, Graphics::TColor AHighlightColor)
- ;
-
- } /* namespace Upttreelist */
- #if !defined(NO_IMPLICIT_NAMESPACE_USE)
- using namespace Upttreelist;
- #endif
- //-- end unit ----------------------------------------------------------------
- #endif // UPTTreeList
-